﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VorkosStringLab
{
    class VorkosString
    {
        static void Main()
        {
            String processingText;
            processingText = EnterText();
            CountUniqWords(processingText);
            Console.ReadKey();
        }
        public static String EnterText()
        {
            String processingText = String.Empty;
            Console.Write(Literals.ENTER);
            processingText = Console.ReadLine();
            return processingText;
        }
        public static void CountUniqWords(String processingText)
        {
            String[] wordsArr = processingText.Split(new Char[] { ' ', ',', '.', ':', '\t' });
            Int32 lenght = wordsArr.Length;
            String[] wordsUniq = new String[lenght + 1];
            Int32 countUniq = 0;

            for (Int32 i = 0; i < lenght; i++)
            {
                bool isUniq = true;
                for (Int32 j = 0; j < lenght; j++)
                {
                    if (i==j)
                    {
                        continue;
                    }
                    if(wordsArr[i].Equals(wordsArr[j]))
                    {
                        isUniq = false;
                        break;
                    }
                }
                if (isUniq)
                {
                    wordsUniq[countUniq++] = wordsArr[i];
                }
            }
            Console.WriteLine(countUniq);

        }

    }
}
